/**
 * Generate time : 2012-01-05 14:06:04
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEFaultStandard table comment : 设备故障标准
 */
public class ZMCEFaultStandard extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdCode = " "; /* 故障编号 */
	private String fdDescription = " "; /* 故障描述 */
	private String fdStandredequipmentId = " "; /* 标准设备ID */
	private String fdToencode = " "; /* 标准设备内码 */

	private String fdEquipmentName = " "; /* 名称 */
	private String fdEquipmentSpecifications = " "; /* 规格 */
	private String fdEquipmentModel = " "; /* 型号 */

	private String fdPhenomenonKeyId = " "; /* FD_KEY_ID */
	private String fdPhenomenonCode = " "; /* 现象编号 */
	private String fdPhenomenonDescription = " "; /* 现象描述 */

	private String fdReasonKeyId = " "; /* FD_KEY_ID */
	private String fdReasonCode = " "; /* 原因编号 */
	private String fdReasonDescription = " "; /* 原因描述 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("故障编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDescription");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("故障描述");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStandredequipmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("标准设备ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdToencode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("标准设备内码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentSpecifications");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("规格");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentModel");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("型号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPhenomenonKeyId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPhenomenonCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("现象编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPhenomenonDescription");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("现象描述");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdReasonKeyId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdReasonCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("原因编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdReasonDescription");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("原因描述");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEFaultStandard() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdCode - 故障编号
	 * 
	 * @return the fdCode
	 */
	public String getFdCode() {
		return this.fdCode;
	}

	/**
	 * set the fdCode - 故障编号
	 */
	public void setFdCode(String fdCode) {
		this.fdCode = fdCode;
	}

	/**
	 * get the fdDescription - 故障描述
	 * 
	 * @return the fdDescription
	 */
	public String getFdDescription() {
		return this.fdDescription;
	}

	/**
	 * set the fdDescription - 故障描述
	 */
	public void setFdDescription(String fdDescription) {
		this.fdDescription = fdDescription;
	}

	/**
	 * get the fdStandredequipmentId - 标准设备ID
	 * 
	 * @return the fdStandredequipmentId
	 */
	public String getFdStandredequipmentId() {
		return this.fdStandredequipmentId;
	}

	/**
	 * set the fdStandredequipmentId - 标准设备ID
	 */
	public void setFdStandredequipmentId(String fdStandredequipmentId) {
		this.fdStandredequipmentId = fdStandredequipmentId;
	}

	/**
	 * get the fdToencode - 标准设备内码
	 * 
	 * @return the fdToencode
	 */
	public String getFdToencode() {
		return this.fdToencode;
	}

	/**
	 * set the fdToencode - 标准设备内码
	 */
	public void setFdToencode(String fdToencode) {
		this.fdToencode = fdToencode;
	}

	/**
	 * @return the fdEquipmentName
	 */
	public String getFdEquipmentName() {
		return fdEquipmentName;
	}

	/**
	 * @param fdEquipmentName
	 *            the fdEquipmentName to set
	 */
	public void setFdEquipmentName(String fdEquipmentName) {
		this.fdEquipmentName = fdEquipmentName;
	}

	/**
	 * @return the fdEquipmentSpecifications
	 */
	public String getFdEquipmentSpecifications() {
		return fdEquipmentSpecifications;
	}

	/**
	 * @param fdEquipmentSpecifications
	 *            the fdEquipmentSpecifications to set
	 */
	public void setFdEquipmentSpecifications(String fdEquipmentSpecifications) {
		this.fdEquipmentSpecifications = fdEquipmentSpecifications;
	}

	/**
	 * @return the fdEquipmentModel
	 */
	public String getFdEquipmentModel() {
		return fdEquipmentModel;
	}

	/**
	 * @param fdEquipmentModel
	 *            the fdEquipmentModel to set
	 */
	public void setFdEquipmentModel(String fdEquipmentModel) {
		this.fdEquipmentModel = fdEquipmentModel;
	}

	/**
	 * @return the fdPhenomenonKeyId
	 */
	public String getFdPhenomenonKeyId() {
		return fdPhenomenonKeyId;
	}

	/**
	 * @param fdPhenomenonKeyId
	 *            the fdPhenomenonKeyId to set
	 */
	public void setFdPhenomenonKeyId(String fdPhenomenonKeyId) {
		this.fdPhenomenonKeyId = fdPhenomenonKeyId;
	}

	/**
	 * @return the fdPhenomenonCode
	 */
	public String getFdPhenomenonCode() {
		return fdPhenomenonCode;
	}

	/**
	 * @param fdPhenomenonCode
	 *            the fdPhenomenonCode to set
	 */
	public void setFdPhenomenonCode(String fdPhenomenonCode) {
		this.fdPhenomenonCode = fdPhenomenonCode;
	}

	/**
	 * @return the fdPhenomenonDescription
	 */
	public String getFdPhenomenonDescription() {
		return fdPhenomenonDescription;
	}

	/**
	 * @param fdPhenomenonDescription
	 *            the fdPhenomenonDescription to set
	 */
	public void setFdPhenomenonDescription(String fdPhenomenonDescription) {
		this.fdPhenomenonDescription = fdPhenomenonDescription;
	}

	/**
	 * @return the fdReasonKeyId
	 */
	public String getFdReasonKeyId() {
		return fdReasonKeyId;
	}

	/**
	 * @param fdReasonKeyId
	 *            the fdReasonKeyId to set
	 */
	public void setFdReasonKeyId(String fdReasonKeyId) {
		this.fdReasonKeyId = fdReasonKeyId;
	}

	/**
	 * @return the fdReasonCode
	 */
	public String getFdReasonCode() {
		return fdReasonCode;
	}

	/**
	 * @param fdReasonCode
	 *            the fdReasonCode to set
	 */
	public void setFdReasonCode(String fdReasonCode) {
		this.fdReasonCode = fdReasonCode;
	}

	/**
	 * @return the fdReasonDescription
	 */
	public String getFdReasonDescription() {
		return fdReasonDescription;
	}

	/**
	 * @param fdReasonDescription
	 *            the fdReasonDescription to set
	 */
	public void setFdReasonDescription(String fdReasonDescription) {
		this.fdReasonDescription = fdReasonDescription;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCode")), fdCode));
		setFdDescription(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDescription")), fdDescription));
		setFdStandredequipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStandredequipmentId")), fdStandredequipmentId));
		setFdToencode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdToencode")), fdToencode));

		setFdEquipmentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentName")), fdEquipmentName));
		setFdEquipmentSpecifications(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentSpecifications")), fdEquipmentSpecifications));
		setFdEquipmentModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentModel")), fdEquipmentModel));

		setFdPhenomenonKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPhenomenonKeyId")), fdPhenomenonKeyId));
		setFdPhenomenonCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPhenomenonCode")), fdPhenomenonCode));
		setFdPhenomenonDescription(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPhenomenonDescription")), fdPhenomenonDescription));

		setFdReasonKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdReasonKeyId")), fdReasonKeyId));
		setFdReasonCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdReasonCode")), fdReasonCode));
		setFdReasonDescription(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdReasonDescription")), fdReasonDescription));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdCode", StringUtils.toString(fdCode, eiMetadata.getMeta("fdCode")));
		map.put("fdDescription", StringUtils.toString(fdDescription, eiMetadata.getMeta("fdDescription")));
		map.put("fdStandredequipmentId", StringUtils.toString(fdStandredequipmentId, eiMetadata.getMeta("fdStandredequipmentId")));
		map.put("fdToencode", StringUtils.toString(fdToencode, eiMetadata.getMeta("fdToencode")));

		map.put("fdEquipmentName", StringUtils.toString(fdEquipmentName, eiMetadata.getMeta("fdEquipmentName")));
		map.put("fdEquipmentSpecifications", StringUtils.toString(fdEquipmentSpecifications, eiMetadata.getMeta("fdEquipmentSpecifications")));
		map.put("fdEquipmentModel", StringUtils.toString(fdEquipmentModel, eiMetadata.getMeta("fdEquipmentModel")));

		map.put("fdPhenomenonKeyId", StringUtils.toString(fdPhenomenonKeyId, eiMetadata.getMeta("fdPhenomenonKeyId")));
		map.put("fdPhenomenonCode", StringUtils.toString(fdPhenomenonCode, eiMetadata.getMeta("fdPhenomenonCode")));
		map.put("fdPhenomenonDescription", StringUtils.toString(fdPhenomenonDescription, eiMetadata.getMeta("fdPhenomenonDescription")));

		map.put("fdReasonKeyId", StringUtils.toString(fdReasonKeyId, eiMetadata.getMeta("fdReasonKeyId")));
		map.put("fdReasonCode", StringUtils.toString(fdReasonCode, eiMetadata.getMeta("fdReasonCode")));
		map.put("fdReasonDescription", StringUtils.toString(fdReasonDescription, eiMetadata.getMeta("fdReasonDescription")));

		return map;

	}
}